package com.cn.entity;

import java.util.Date;

import javax.persistence.Cacheable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.search.annotations.DocumentId;


/**
 * 运营商
 * @author zlei
 *
 */
@Entity
@Table(name="smsoperator")
@GenericGenerator(name = "system-uuid",strategy = "uuid")
@Cacheable
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class SMSOperator {
	/**
	 * id
	 */
	@Id
	@GeneratedValue(generator="system-uuid")
	@Column(name="smsOperatorID",length=32)
	@DocumentId(name="smsOperatorID")
	private String smsOperatorID; 
	/**
	 * 运营商优先级
	 * 10-20 10最优先 依次降序
	 */
	@Column(name="priority")
	private int priority;
	/**
	 * 运营商名称
	 */
	@Column(name="smsOperatorName")
	private String smsOperatorName;
	/**
	 * 运行商代码
	 */
	@Column(name="joinNum")
	private String joinNum;
	/**
	 * 接入状态
	 * 0：关 1：开
	 */
	@Column(name="joinState")
	private String joinState;
	/**
	 * 创建时间
	 */
	@Column(name="createDate")
	private Date createDate;
	/**
	 * 修改时间
	 */
	@Column(name="updateDate")
	private Date updateDate;
	
	/**
	 * 运营商优先级
	 * @return
	 */
	public int getPriority() {
		return priority;
	}
	/**
	 * 运营商优先级
	 * @return
	 */
	public void setPriority(int priority) {
		this.priority = priority;
	}
	/**
	 * id
	 * @return
	 */
	public String getSmsOperatorID() {
		return smsOperatorID;
	}
	/**
	 * id
	 * @return
	 */
	public void setSmsOperatorID(String smsOperatorID) {
		this.smsOperatorID = smsOperatorID;
	}
	/**
	 * 运营商名称
	 * @return
	 */
	public String getSmsOperatorName() {
		return smsOperatorName;
	}
	/**
	 * 运营商名称
	 * @return
	 */
	public void setSmsOperatorName(String smsOperatorName) {
		this.smsOperatorName = smsOperatorName;
	}
	/**
	 * 接入号
	 * @return
	 */
	public String getJoinNum() {
		return joinNum;
	}
	/**
	 * 接入号
	 * @return
	 */
	public void setJoinNum(String joinNum) {
		this.joinNum = joinNum;
	}
	/**
	 * 接入状态
	 * @return
	 */
	public String getJoinState() {
		return joinState;
	}
	/**
	 * 接入状态
	 * @return
	 */
	public void setJoinState(String joinState) {
		this.joinState = joinState;
	}
	/**
	 * 创建时间
	 * @return
	 */
	public Date getCreateDate() {
		return createDate;
	}
	/**
	 * 修改时间
	 * @return
	 */
	public Date getUpdateDate() {
		return updateDate;
	}
	/**
	 * 修改时间
	 * @return
	 */
	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}
	/**
	 * 构造方法
	 * @param smsOperatorID
	 * @param priority
	 * @param smsOperatorName
	 * @param joinNum
	 * @param joinState
	 * @param createDate
	 * @param updateDate
	 */
	public SMSOperator(String smsOperatorID, int priority,
			String smsOperatorName, String joinNum, String joinState,
			Date createDate, Date updateDate) {
		super();
		this.smsOperatorID = smsOperatorID;
		this.priority = priority;
		this.smsOperatorName = smsOperatorName;
		this.joinNum = joinNum;
		this.joinState = joinState;
		this.createDate = createDate;
		this.updateDate = updateDate;
	}
	public SMSOperator() {
		this.createDate = new Date();
		this.updateDate = new Date();
	}
}
